// @ts-nocheck
import { request } from '@/request'


//获取验证码
export function getCaptcha() {
    return request({
        url: '/captcha/generate',
        method: 'get',
        responseType: 'blob'
    })
}
//管理员登录
export function login(data) {
    return request({
        url: '/user/login',
        data: data,
        method: 'post',
    })
}
//注册
export function register(data) {
    return request({
        url: '/user/register',
        data: data,
        method: 'post',
    })
}
//用户列表
export function userList(data) {
    return request({
        url: '/user/list',
        data: data,
        method: 'post',
    })
}
//用户搜索
export function userSearch(data) {
    return request({
        url: '/user/search',
        data: data,
        method: 'post',
    })
}
//用户信息
export function userInfo(data) {
    return request({
        url: '/user/getInfo',
        data: data,
        method: 'post',
    })
}
//用户信息修改
export function userEdit(data) {
    return request({
        url: '/user/edit',
        data: data,
        method: 'post',
    })
}
//用户信息修改
export function userDelete(data) {
    return request({
        url: '/user/delete',
        data: data,
        method: 'post',
    })
}   
//用户信息修改
export function updatePassword(data) {
    return request({
        url: '/user/updatePassword',
        data: data,
        method: 'post',
    })
}
//血压列表
export function recordList(data) {
    return request({
        url: '/record/getList',
        data: data,
        method: 'post',
    })
}

export function getFileList(data) {
    return request({
        url: '/upload/getList',
        data: data,
        method: 'post',
    })
}
export function getSettingInfo() {
    return request({
        url: '/setting/getInfo',
        method: 'post',
    })
}
export function updateSetting(data) {
    return request({
        url: '/setting/update',
        data: data,
        method: 'post',
    })
}
export function logout() {
    return request({
        url: '/user/logout',
        method: 'post',
    })
}